# -*- coding: utf-8 -*-

from odoo import models, fields, api


class PriceListProductSupplierinfo(models.Model):
    _inherit = 'product.supplierinfo'

    discount = fields.Float(string='折扣(%)')



class PriceListProductTemplate(models.Model):
    _inherit = 'product.template'

    made_from = fields.Char('產地')
    product_cate_type = fields.Selection(
        selection=[(u'生活家', '生活家'), (u'飲水家', '飲水家'), (u'美食家', '美食家'),
                   (u'健康家', '健康家'), (u'涼爽家', '涼爽家'), (u'暖活家', '暖活家')], string='產品類別')
    product_type_line = fields.Many2one(comodel_name='product.type.line', string='產品種類')
    product_satae = fields.Many2many(comodel_name='product.state', string='狀態')
    product_bound = fields.Integer(string='一次購買數量')

class PriceListCategory(models.Model):
    _name = 'product.type.line'

    name = fields.Char(string='產品種類')


class PriceListProductState(models.Model):
    _name = 'product.state'

    name = fields.Char(string='狀態名稱')
    color = fields.Integer(string='Color Index')
    active = fields.Boolean(default=True, string='啟用')

